home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
graphics
/
3dvect30.arj
/
QB.ARJ
/
SHADING.BAS
< prev
Wrap
BASIC Source File
|
1993-10-08
|
744b
|
41 lines
DECLARE FUNCTION c$ (qq!)
x$ = "shading_tables:"
b$ = " db "
r$ = ","
PRINT " align 4"
PRINT
PRINT x$
DIM x(256)
FOR xa = 0 TO 255
rya = TAN((xa - 128) / 256 * .88) * 16 + 8
x(xa) = INT(rya)
NEXT xa
PRINT b$;
FOR z = 0 TO 255 STEP 16
PRINT c$(x(z)); r$; c$(x(z + 1)); r$; c$(x(z + 2)); r$; c$(x(z + 3)); r$; c$(x(z + 4)); r$;
PRINT c$(x(z + 5)); r$; c$(x(z + 6)); r$; c$(x(z + 7)); r$;
PRINT c$(x(z + 8)); r$; c$(x(z + 9)); r$; c$(x(z + 10)); r$; c$(x(z + 11)); r$; c$(x(z + 12)); r$;
PRINT c$(x(z + 13)); r$; c$(x(z + 14)); r$; c$(x(z + 15))
IF z < 255 - 16 THEN PRINT b$;
NEXT z
FUNCTION c$ (qq)
c$ = LTRIM$(RTRIM$(STR$(qq)))
END FUNCTION